#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
#include <vector>



int main()
{
	vector<int> v1(10, 2);

	//vector<int> v2;
	
	vector<int>::iterator it = v1.begin();
	while (it != v1.end())
	{
		cout << *it << " ";
		it++;
	}
	cout << endl;

	
	cout << v1.size() << endl;
	cout << v1.capacity() << endl;
	v1.resize(20);

	for (int i = 0; i < v1.size(); i++)
	{
		cout << v1[i] << " ";
	}
	cout << endl;

	cout << v1.size() << endl;
	cout << v1.capacity() << endl;
	v1.resize(3);
	for (auto e : v1)
	{
		cout << e << " ";
	}
	cout << endl;

	cout << v1.size() << endl;
	cout << v1.capacity() << endl;
	cout << endl;

	vector<int> v2(10, 3);
	v2.push_back(9);
	for (auto e : v2)
	{
		cout << e << "";
	}
	cout << endl;

	v2.insert(v2.begin(), 6);
	v2.insert(v2.begin() + 3, 7);
	
	vector<int>::iterator bit = v2.begin();
	while (bit != v2.end())
	{
		cout << *bit<<"";
		bit++;
	}
	cout << endl;

	v2.erase(v2.begin() + 3);

	for (auto e : v2)
	{
		cout << e << "";
	}
	cout << endl;



	return 0;
}